using PoemGame.Domain.Services.Feihualing;
using PoemService.ApiClient;
using PoemService.Shared;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddScoped<IPoemService, PoemServiceApiClient>();
builder.Services.AddScoped<FeihualingCheckAnswerService>();
builder.Services.AddScoped<FeihualingCheckGameConditionService>();
builder.Services.AddControllers();
builder.Services.AddHttpClient();

builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();

if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}

app.UseAuthorization();

app.MapControllers();

app.Run();
